#include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
double triangleArea(const double* parray)
{
	double q = (parray[0] + parray[1] + parray[2]) / 2;
	return sqrt(q * (q - parray[0]) * (q - parray[1]) * (q - parray[2]));
}
int main()
{
	double parray[3];
	cout << "请依次输入三条边长: ";
	for (int i = 0; i < 3; i++) {
		cin >> parray[i];
	}
	cout << "---------------------------" << endl;
	cout << "边长为" << parray[0] << "," << parray[1] << "," << parray[2] << "的三角形面积: " << triangleArea(parray) << endl;
	system("pause");
	
	return 0;
}